package com.java.socket;

import org.junit.Test;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class TcpServer2 {

	public static void main(String[] args) throws IOException, InterruptedException {
		ServerSocket serverSocket = new ServerSocket(4000);
		while(true){
			Socket socket = serverSocket.accept();
			new ServerInputThread(socket).start();
			new ServerOutputThread(socket).start();
		}
	}
}
